<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        111
        <!-- 全局组件 -->
        <hello></hello>
        <!-- 局部组件 -->
        <haha></haha>
    </div>
    <div id="app2">
        2222
        <hello></hello>
        <haha></haha>
    </div>
    <div id="app3">
        333
        <hello></hello>
    </div>
</body>
<script src="./vue.min.js"></script>
<script>
    Vue.component("hello",{
        template:`<h1>你好我是组件</h1>`
            
    })

    let vm1 = new Vue({
        el:"#app",
        components:{
            haha:{
                template:"<b>哈哈哈</b>"
            }
        }
    })

    let vm2 = new Vue({
        el:"#app2"
    })

    let vm3 = new Vue({
        el:"#app3"
    })
</script>
</html>